import requests

url = "https://www.baidu.com"
data = {'username':'admin','password':'admin','submit':'登录'}
r = requests.post(url=url,data=data)
print(r.status_code)
print(type(r.text))
if r.text.fine('百度一下'):
    print('cg')
#实际情况下